package com.morningstar.qs.basic.db.bean;

import java.io.Serializable;

/**
 * This is an object that contains data related to the UserWorkspaceCategoryMap
 * table. Do not modify this class because it will be overwritten if the
 * configuration file related to this class is modified.
 * 
 * @hibernate.class table="UserWorkspaceCategoryMap"
 */

public class UserWorkspaceCategoryMap implements Serializable {

	/*
	 * public static String REF = "UserWorkspaceCategoryMap"; public static
	 * String PROP_CREATE_TIME = "createTime"; public static String PROP_ID =
	 * "id";
	 */

	/**
	 * 
	 */
	private static final long serialVersionUID = 7379336675905488080L;

	// constructors
	public UserWorkspaceCategoryMap() {
	}
	
	public UserWorkspaceCategoryMap(int catagoryId, int workspaceId) {
		this.categoryId=catagoryId;
		this.workspaceId=workspaceId;
	}


	private int hashCode = Integer.MIN_VALUE;

	// composite primary key
	private Integer categoryId;
	private Integer workspaceId;

	// fields
	private java.util.Date createTime;

	/**
	 * Return the value associated with the column: CreateTime
	 */
	public java.util.Date getCreateTime() {
		return createTime;
	}

	/**
	 * Set the value related to the column: CreateTime
	 * 
	 * @param createTime
	 *            the CreateTime value
	 */
	public void setCreateTime(java.util.Date createTime) {
		this.createTime = createTime;
	}

	public boolean equals(Object obj) {
		if (null == obj)
			return false;
		if (!(obj instanceof com.morningstar.qs.basic.db.bean.UserWorkspaceCategoryMap))
			return false;
		else {
			UserWorkspaceCategoryMap userWorkspaceCategoryMap = (UserWorkspaceCategoryMap) obj;
			if(null==this.getCategoryId() || null == userWorkspaceCategoryMap.getCategoryId()) return false;
			if(this.getCategoryId()!= userWorkspaceCategoryMap.getCategoryId()) return false;
			if(null==this.getWorkspaceId() || null == userWorkspaceCategoryMap.getWorkspaceId()) return false;
			if(this.getWorkspaceId() != userWorkspaceCategoryMap.getWorkspaceId()) return false;
		}
		return true;
	}

	public int hashCode() {
		if (Integer.MIN_VALUE == this.hashCode) {
			this.hashCode=this.categoryId*31+this.workspaceId*71;
		}
		return this.hashCode;
	}

	public String toString() {
		StringBuilder sb=new StringBuilder();
		sb.append("categoryId:\t").append(categoryId==null?"":categoryId.toString()).append(System.getProperty("line.separator"));
		sb.append("workspaceId:\t").append(workspaceId==null?"":workspaceId);
		return sb.toString();
	}

	public Integer getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(Integer categoryId) {
		this.categoryId = categoryId;
	}

	public Integer getWorkspaceId() {
		return workspaceId;
	}

	public void setWorkspaceId(Integer workspaceId) {
		this.workspaceId = workspaceId;
	}
	
	

}